
export const widgetSwitch = {
  code: 'widget-switch',
  type: 'html',
  label: '状态',
  icon: 'icontupian',
  options: {
    // 配置
    setup: [
      {
        type: 'el-input-text',
        label: '图层名称',
        name: 'layerName',
        required: false,
        placeholder: '',
        value: '状态',
      },
      // {
      //   type: 'el-input-text',
      //   label: '文本内容',
      //   name: 'text',
      //   required: false,
      //   placeholder: '',
      //   value: '文本框',
      // },
      {
        type: 'el-input-number',
        label: '开关大小',
        name: 'switchSize',
        required: false,
        placeholder: '',
        value: 40,
      },
      {
        type: 'vue-color',
        label: '背景色(开)',
        name: 'activeColor',
        required: false,
        placeholder: '',
        value: '#13ce66',
      },
      {
        type: 'vue-color',
        label: '背景色(关)',
        name: 'inactiveColor',
        required: false,
        placeholder: '',
        value: '#ff4949',
      },
      {
        type: 'el-switch',
        label: '开启遥控',
        name: 'openYk',
        required: false,
        placeholder: '',
        value: false
      },
      {
        type: 'el-input-textarea',
        label: '遥控信息体',
        name: 'ykInfo',
        required: false,
        placeholder: '',
      },
    ],
    // 数据
    data: [
      {
        type: 'el-radio-group',
        label: '数据类型',
        name: 'dataType',
        require: false,
        placeholder: '',
        selectValue: true,
        selectOptions: [
          {
            code: 'staticData',
            name: '静态数据',
          },
          {
            code: 'dynamicData',
            name: '动态数据',
          },
        ],
        value: 'staticData',
      },
      {
        type: 'el-button',
        label: '静态数据',
        name: 'staticData',
        required: false,
        placeholder: '',
        relactiveDom: 'dataType',
        relactiveDomValue: 'staticData',
        value: '0',
      },
      {
        type: 'dycustComponents',
        label: '',
        name: 'dynamicData',
        required: false,
        placeholder: '',
        relactiveDom: 'dataType',
        relactiveDomValue: 'dynamicData',
        isButton: true,
        chartType: 'widget-switch',
        value: {},
        param: [],
      }
    ],

    // 坐标
    position: [
      {
        type: 'el-input-number',
        label: '左边距',
        name: 'left',
        required: false,
        placeholder: '',
        value: 0,
      },
      {
        type: 'el-input-number',
        label: '上边距',
        name: 'top',
        required: false,
        placeholder: '',
        value: 0,
      },
      {
        type: 'el-input-number',
        label: '宽度',
        name: 'width',
        required: false,
        placeholder: '该容器在1920px大屏中的宽度',
        value: 50,
      },
      {
        type: 'el-input-number',
        label: '高度',
        name: 'height',
        required: false,
        placeholder: '该容器在1080px大屏中的高度',
        value: 30
      },
    ],
  }
}